﻿
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ECItemPartirPanel.ascx.cs" 
Inherits="UILGestion.Control.ECItemPartirPanel" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc2" %>

<script src="../Scripts/partirRecurso.js" type="text/javascript"></script>
            

           <asp:UpdatePanel ID="partirUpdatePanel" runat="server" UpdateMode="Always">
            <ContentTemplate>
           
               <asp:Panel ID="Panel1" runat="server" CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
                Partir Recurso
                </asp:Panel>

               <asp:Panel ID="Panel2" runat="server"  class="ms-crm-Form-Body" Height="350px" >
                 <input id="idEstructuraCostoPartir" type="hidden"  runat="server" />
                               <input id="idRecursoPartirList" type="hidden"  runat="server" />
                               <input id="idRecursoPartirObj" type="hidden"  runat="server" />
                               <input id="idEstructuraCosto" type="hidden"  runat="server" />
                               <input id="simbolMoneda" type="hidden"  runat="server" />
                               

                               
<table   >
            <tr>
                    <td   >
                    <table  style="background-color:White">
                    <tr>
                    <td align="right"  width="100px">Presupuesto:</td>
                    <td  width="500px">
                        <asp:Label ID="presupuestoLabel" runat="server"  ></asp:Label>
                    </td>
                    </tr>
                    
                     <tr>
                    <td  align="right">
                        Partida:</td>
                    <td >
                        <asp:Label ID="desPartidaRecursoPartirLabel" runat="server"  ></asp:Label>
                    </td>
                    
                 
                </tr>
                <tr>
                    <td  align="right">
                       Recurso:</td>
                    <td >
                        <asp:Label ID="descripcionRecursoPartirLabel" runat="server" ></asp:Label>
                    </td>
                   
                </tr>
                <tr>
                    <td  align="right">
                        Unidad: </td>
                    <td >
                        <asp:Label ID="unidadLabel" runat="server"></asp:Label>
                    </td>
                </tr>
                    </table>

                        
                    <td rowspan="3" valign="TOP">
                        <table class="PanelTotales">
                        <tr>
                        <td align="right" width="100px">
                        &nbsp; Total Recurso:</td>
                    <td align="right" width="100px">
                        <asp:Label ID="TotalRecursoLabel" runat="server"></asp:Label>
                    </td> 
                        </tr>
                        <tr>
                         <td align="right" width="100px">
                        Total Particion:</td>
                    <td align="right" width="100px">
                        <asp:Label ID="TotalParticionLabel" runat="server" ></asp:Label>
                    </td>
                        </tr>

                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                            </tr>

                        </table>
                        </td>
                 
                </tr>
               
            </table>
            
        <asp:Panel ID="Panel3" runat="server" Height="330px" ScrollBars="Vertical" BackColor="White" 
                       BorderColor="LightSteelBlue" BorderStyle="Solid" BorderWidth="1px"   >
              
                 
       <asp:GridView ID="itemGridView" 
       Runat="Server" 
       AutoGenerateColumns="false" 
       DataKeyNames="idInternal"  
       ShowFooter = "True"       
     SkinID="GridView"    
>
                  <Columns>
    
                
                  <asp:TemplateField     HeaderText = "CODIGO"  ItemStyle-Width="75px"  >
                                       <ItemTemplate>
                                       
                                                <asp:Label ID="codigoLabel"    runat="server"    	 
                                                Text='<%# Eval("codigo")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:Label ID="codigoLabel"    runat="server"    	 
                                                Text='<%# Eval("codigo")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                    </EditItemTemplate>
                                       <FooterTemplate>
                                               <asp:Label ID="codigoInsertLabel" runat="server"      
                                               BackColor="Transparent" 
                                                />
                                       </FooterTemplate>
                                      
                   </asp:TemplateField>
                  <asp:TemplateField     HeaderText = "DESCRIPCION"   ItemStyle-Width="400px" HeaderStyle-Width="400px">
                                       <ItemTemplate>
                                                <asp:Label ID="descripcionLabel"     runat="server"    	 
                                                Text='<%# Eval("descripcion")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                     <EditItemTemplate>
                                     <asp:Label ID="descripcionLabel"     runat="server"    	 
                                                Text='<%# Eval("descripcion")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                    </EditItemTemplate>
                                        <FooterTemplate>
                                               <asp:Label ID="descripcionInsertLabel" runat="server"     
                                               BackColor="Transparent" 
                                                />
                                       </FooterTemplate>
                                      
                   </asp:TemplateField>
                      <asp:TemplateField     HeaderText = "UNID."  ItemStyle-Width="35px" >
                                       <ItemTemplate>
                                                <asp:Label ID="unidadLabel"     runat="server"     
                                                Text='<%# Eval("unidad")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                       </ItemTemplate>
                                     
                                        <FooterTemplate>
                                               <asp:Label ID="unidadInsertLabel" runat="server"    
                                               BackColor="Transparent" 
                                               />
                                       </FooterTemplate>
                                      
                   </asp:TemplateField>

                   <asp:TemplateField     HeaderText = "CANTIDAD"  ItemStyle-HorizontalAlign="Right"  >
                                       <ItemTemplate>
                                        
                                                <asp:Label ID="cantidadLabel"   Width="80"  runat="server"    style="text-align:right;" 
                                                Text='<%# Eval("cantidadStr")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                                 
                                       </ItemTemplate>
                                       <FooterTemplate>
                                       <table width="100%">
                                    
                                       <tr>
                                       <td align="right"><b>Disp:</b></td>
                                       <td  align="right">
                                       
                                          
                                               <asp:Label ID="cantidadBaseLabel" runat="server" BackColor="Transparent" />
                                          
                                       </td>
                                       </tr>
                                          <tr>
                                               <td align="right"><b>Uso:</b> </td>
                                               <td> 
                                                   <cc2:PostTextBox ID="cantidadInsertTextBox" runat="server"  CssClass="text"
                                                   
                                                   class="ms-crm-Text " onchange="javascript:calcularTotalXCantParcialEdit(this);" TabIndex="2"  DataType="Double"
                                                       Width="80" />

                                                     </td>
                                                        
                                        </tr>
                                       </table>
                                       
                                                
                                               
                                       </FooterTemplate>
                                       
                   </asp:TemplateField>

                   <asp:TemplateField     HeaderText = "PRECIO"  ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" >
                                       <ItemTemplate>
                                        
                                                <asp:Label ID="precioLabel"   Width="80"  runat="server"    	 
                                                Text='<%# Eval("precioStr")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                              
                                       </ItemTemplate>
                                       <FooterTemplate>

                                      
                                           <cc2:PostTextBox  ID="precioInsertTextBox" runat="server" BackColor="Transparent"  ReadOnly="true" Width="0"  />
                                           <asp:Label ID="precioBaseLabel" runat="server" BackColor="Transparent" />
                                               
                                           
                                                      <asp:Label  ID="precioBaseTextBox" runat="server"   BackColor="Transparent"      ReadOnly="true"   />
                                              
                                               
                                       </FooterTemplate>
                                     
                   </asp:TemplateField>

                    <asp:TemplateField     HeaderText = "TOTAL"  ItemStyle-HorizontalAlign="Right">
                                       <ItemTemplate>
                                         
                                                <asp:Label ID="totalLabel"   Width="80"  runat="server"    	 
                                                Text='<%# Eval("totalStr")%>' 
                                                BackColor="Transparent" > </asp:Label>
                                            
                                       </ItemTemplate>
                                         <FooterTemplate>

                                       <table width="100%">
                                  
                                       <tr>
                                       <td align="right"><b>Disp:</b></td>
                                       <td  align="right">
                                           
                                               <asp:Label ID="totalBaseInsertLabel" runat="server" BackColor="Transparent" />
                                          
                                       </td>
                                       </tr>
                                            <tr>
                                               <td align="right"><b>Uso:</b> </td>
                                               <td>
                                                  <cc2:PostTextBox ID="totalInsertTextBox" runat="server"
                                                   

                                                       onchange="javascript:calcularCantXTotalParcialEdit(this);"   DataType="Double"
                                                       Width="80" />

                                                      
                                               </td>
                                        </tr>
                                       </table>

                                               
                                       </FooterTemplate>
                                     
                   </asp:TemplateField>


                    <asp:TemplateField >
                            <ItemTemplate>
                                <asp:ImageButton ID="ImageButton1" runat="server" 
                                Width="15px"
                                OnClientClick="return confirm('Usted quiere eliminar?')" 
                                 CommandArgument='<%# Eval("idInternal")%>'  OnClick="DeleteItem" 
                                  ImageUrl="~/estilos/_imgs/delete.gif" />
                                <%--<asp:LinkButton ID="lnkRemove" runat="server"  
                                
                                
                                Text="&lt;img src=&quot;../Images/delete.gif&quot; /&gt;"></asp:LinkButton>--%>
                           </ItemTemplate>
                           <FooterTemplate>
                           
                            <asp:Button ID="btnAdd" runat="server" onclick="AddItem"    CssClass="ms-crm-List-Header"
                                                     Text="Añadir"></asp:Button>
                                                     </FooterTemplate>
                                                     <%-- Text="&lt;img src=&quot;../Images/up.gif&quot; /&gt;">--%>
                    </asp:TemplateField>
                  </Columns>
                  </asp:GridView>
         </asp:Panel>  
</asp:Panel>
 
               
            </ContentTemplate>
           
            </asp:UpdatePanel>
          
    
          
    



          
    


